module sobel_conv_x
	(
		input signed [7:0] pix_0,
		input signed [7:0] pix_1,
		input signed [7:0] pix_2,
		input signed [7:0] pix_3,
		input signed [7:0] pix_4,
		input signed [7:0] pix_5,
		input signed [7:0] pix_6,
		input signed [7:0] pix_7,
		input signed [7:0] pix_8,
		input signed [7:0] pix_9,
		input signed [7:0] pix_10,
		input signed [7:0] pix_11,
		input signed [7:0] pix_12,
		input signed [7:0] pix_13,
		input signed [7:0] pix_14,
		input signed [7:0] pix_15,
		input signed [7:0] pix_16,
		input signed [7:0] pix_17,
		input signed [7:0] pix_18,
		input signed [7:0] pix_19,
		input signed [7:0] pix_20,
		input signed [7:0] pix_21,
		input signed [7:0] pix_22,
		input signed [7:0] pix_23,
		input signed [7:0] pix_24,
		output signed [30:0] pix_o
	);

//sobel x kernel
localparam signed W0 = 8'd1;
localparam signed W1 = 8'd2;
localparam signed W2 = 8'd0;
localparam signed W3 = -8'd2;
localparam signed W4 = -8'd1;
localparam signed W5 = 8'd4;
localparam signed W6 = 8'd8;
localparam signed W7 = 8'd0;
localparam signed W8 = -8'd8;
localparam signed W9 = -8'd4;
localparam signed W10 = 8'd6;
localparam signed W11 = 8'd12;
localparam signed W12 = 8'd0;
localparam signed W13 = -8'd12;
localparam signed W14 = -8'd6;
localparam signed W15 = 8'd4;
localparam signed W16 = 8'd8;
localparam signed W17 = 8'd0;
localparam signed W18 = -8'd8;
localparam signed W19 = -8'd4;
localparam signed W20 = 8'd1;
localparam signed W21 = 8'd2;
localparam signed W22 = 8'd0;
localparam signed W23 = -8'd2;
localparam signed W24 = -8'd1;


wire signed [15:0] pix_0_multi;
wire signed [15:0] pix_1_multi;
wire signed [15:0] pix_2_multi;
wire signed [15:0] pix_3_multi;
wire signed [15:0] pix_4_multi;
wire signed [15:0] pix_5_multi;
wire signed [15:0] pix_6_multi;
wire signed [15:0] pix_7_multi;
wire signed [15:0] pix_8_multi;
wire signed [15:0] pix_9_multi;
wire signed [15:0] pix_10_multi;
wire signed [15:0] pix_11_multi;
wire signed [15:0] pix_12_multi;
wire signed [15:0] pix_13_multi;
wire signed [15:0] pix_14_multi;
wire signed [15:0] pix_15_multi;
wire signed [15:0] pix_16_multi;
wire signed [15:0] pix_17_multi;
wire signed [15:0] pix_18_multi;
wire signed [15:0] pix_19_multi;
wire signed [15:0] pix_20_multi;
wire signed [15:0] pix_21_multi;
wire signed [15:0] pix_22_multi;
wire signed [15:0] pix_23_multi;
wire signed [15:0] pix_24_multi;


multi u0_multi(.muld(W0), .mulr(pix_0), .res(pix_0_multi));
multi u1_multi(.muld(W1), .mulr(pix_1), .res(pix_1_multi));
multi u2_multi(.muld(W2), .mulr(pix_2), .res(pix_2_multi));
multi u3_multi(.muld(W3), .mulr(pix_3), .res(pix_3_multi));
multi u4_multi(.muld(W4), .mulr(pix_4), .res(pix_4_multi));
multi u5_multi(.muld(W5), .mulr(pix_5), .res(pix_5_multi));
multi u6_multi(.muld(W6), .mulr(pix_6), .res(pix_6_multi));
multi u7_multi(.muld(W7), .mulr(pix_7), .res(pix_7_multi));
multi u8_multi(.muld(W8), .mulr(pix_8), .res(pix_8_multi));
multi u9_multi(.muld(W9), .mulr(pix_9), .res(pix_9_multi));
multi u10_multi(.muld(W10), .mulr(pix_10), .res(pix_10_multi));
multi u11_multi(.muld(W11), .mulr(pix_11), .res(pix_11_multi));
multi u12_multi(.muld(W12), .mulr(pix_12), .res(pix_12_multi));
multi u13_multi(.muld(W13), .mulr(pix_13), .res(pix_13_multi));
multi u14_multi(.muld(W14), .mulr(pix_14), .res(pix_14_multi));
multi u15_multi(.muld(W15), .mulr(pix_15), .res(pix_15_multi));
multi u16_multi(.muld(W16), .mulr(pix_16), .res(pix_16_multi));
multi u17_multi(.muld(W17), .mulr(pix_17), .res(pix_17_multi));
multi u18_multi(.muld(W18), .mulr(pix_18), .res(pix_18_multi));
multi u19_multi(.muld(W19), .mulr(pix_19), .res(pix_19_multi));
multi u20_multi(.muld(W20), .mulr(pix_20), .res(pix_20_multi));
multi u21_multi(.muld(W21), .mulr(pix_21), .res(pix_21_multi));
multi u22_multi(.muld(W22), .mulr(pix_22), .res(pix_22_multi));
multi u23_multi(.muld(W23), .mulr(pix_23), .res(pix_23_multi));
multi u24_multi(.muld(W24), .mulr(pix_24), .res(pix_24_multi));
		
assign pix_o = pix_0_multi + pix_1_multi + pix_2_multi + pix_3_multi + pix_4_multi + pix_5_multi + pix_6_multi + pix_7_multi + pix_8_multi + pix_9_multi + pix_10_multi + pix_11_multi + pix_12_multi + pix_13_multi + pix_14_multi + pix_15_multi + pix_16_multi + pix_17_multi + pix_18_multi + pix_19_multi + pix_20_multi + pix_21_multi + pix_22_multi + pix_23_multi + pix_24_multi;

endmodule